Image processing apparatus and method of processing image

ABSTRACT

Provided is an image processing apparatus that can effectively display an image by using an optimized dynamic range compression technique and a method of processing an image by using the same. The method includes: obtaining a first blurred image and a second blurred image from the input image; estimating illuminance of the input image by combining the first blurred image and the second blurred image; generating a dark region amplified image from the input image; generating a bright region conserved image from the input image; applying weights to the dark region amplified image and the bright region conserved image, respectively, according to the estimated illuminance; and combining the weighted dark region amplified image and the weighted bright region conserved image to generate a final image.

CROSS-REFERENCE TO RELATED PATENT APPLICATION

This application claims priority from Korean Patent Application No.10-2012-0139267, filed on Dec. 3, 2012, in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein in itsentirety by reference.

BACKGROUND

1. Field

Apparatuses and methods consistent with exemplary embodiments relate toprocessing an image and, more particularly, to image processing that caneffectively display an image by using an optimized dynamic rangecompression (DRC) technique.

2. Description of the Related Art

The DRC technique is used for increasing brightness of a portion of animage that is not clearly seen in a dark region and a bright region ofthe image by compressing a dynamic range that indicates a brightnessratio between a brightest region and a darkest region in the image.Generally, in order to increase brightness of an image, a tone-mappingfunction is used on an entire image. However, contrast is reduced andinformation is damaged on a specific region of the image.

It is known that a retinex algorithm using the DRC technique, which isdesigned based on a retinex theory, exhibits a high performance inincreasing brightness of an image. The retinex algorithm is a method ofsynthesizing an image by reducing an effect of illuminance, increasingreflectance of an input image after estimating illuminance of the inputimage by using a Gaussian filter and obtaining a reflectance image thatincludes a feature of an object by removing the illuminance of the inputimage. However, in order to estimate illuminance, a sufficiently largeGaussian filter is needed, and a halo artifact occurs on a portion of animage which has large brightness differences.

SUMMARY

One or more exemplary embodiments provide an image processing apparatusthat may minimize occurrence of a halo artifact effect by using anoptimized dynamic range compression (DRC) technique and increasecontrast of an image.

One or more exemplary embodiments also provide a method of processing animage by using the image processing apparatus.

According to an aspect of an exemplary embodiment, there is provided amethod of processing an input image, the method including: obtaining afirst blurred image and a second blurred image from the input image;estimating illuminance of the input image by combining the first blurredimage and the second blurred image; generating a dark region amplifiedimage from the input image; generating a bright region conserved imagefrom the input image; applying weights to the dark region amplifiedimage and the bright region conserved image, respectively, according tothe estimated illuminance; and combining the weighted dark regionamplified image and the weighted bright region conserved image togenerate a final image.

In the above, the input image may be an image which is filtered touniformly distribute information of the input image over an entireregion of a histogram of the input image.

The filtering may include: generating a first curve and a second curvehaving different amplification degrees; applying other weights to thefirst curve and the second curve, respectively, according to a ratiobetween a first maximum value and a second maximum value, wherein thefirst maximum value and the second maximum value are obtained by passingthe input image through the first curve and the second curve,respectively; generating a third curve by summing the weighted firstcurve and the weighted second curve; and passing the input image throughthe generated third curve.

The estimating the illuminance may include: down-sampling the inputimage; generating the first blurred image by interpolating thedown-sampled input image; generating the second blurred image formed ofmaximum value pixels respectively included in predetermined-size blocksof the input image; applying other weights to the first blurred imageand the second blurred image, respectively, according to characteristicsof the input image; combining the weighted first blurred image and theweighted second blurred image; and calculating the estimated illuminancefrom the combined image.

The method may further include processing an entire brightness of thecombined image to be uniform and generate the estimated illuminancetherefrom.

The generating the dark region amplified image may include: amplifyingbrightness of a dark region of the input image, and increasing contrastof the dark region of the input image; and increasing contrast of alocal region in the dark region the contrast of which is increased.

The generating the bright region conserved image may include:maintaining brightness of a bright region having greater brightness thana medium-brightness region of the input image; and increasing contrastof the medium-brightness region of the input image.

The weights applied to the dark region amplified image and the brightregion conserved image may be different from each other according towhether the estimated illuminance is lower than a critical value.

The weight applied to the dark region amplified image may be greaterthan the weight applied to the bright region conserved image if theestimated luminance is lower than the critical value.

The combining process may further include increasing contrast of thefinal image by performing brightness amplification of a dark region ofthe final image.

According to an aspect of another exemplary embodiment, there isprovided an image processing apparatus including: an illuminanceestimation unit configured to obtain a first blurred image and a secondblurred image from an input image and estimate illuminance of the inputimage by combining the first blurred image and the second blurred imageaccording to characteristics of the input image; a dark regionamplifying unit configured to generate a dark region amplified imagefrom the input image; a bright region conservation unit configured togenerate a bright region conserved image from the input image; and acombination unit configured to apply weights to the dark regionamplified image and the bright region conserved image, respectively,according to the estimated illuminance, and combine the weighted darkregion amplified image and the weighted bright region conserved image togenerate a final image.

The image processing apparatus may further include a filtering unitconfigured to generate the input image by uniformly distributinginformation of the input image over an entire region of a histogram ofthe input image.

The illuminance estimation unit may further include: a first blurringunit configured to down-sample the input image and generate the firstblurred image by interpolating the down-sampled input image; a secondblurring unit configured to generate the second blurred image formedmaximum value pixels respectively included in predetermined-size blocksof the input image; and an illuminance computation unit configured toapply other weights to the first blurred image and the second blurredimage, respectively, according to characteristics of the input image,combine the weighted first blurred image and the weighted second blurredimage, and calculate the estimated illuminance from the combined image.

The image processing apparatus may further include a halo artifactreducing unit configured to process an entire brightness of the combinedimage to be uniform and generate the estimated illuminance therefrom.

The dark region amplifying unit may include: a global contrastincreasing unit configured to amplify brightness of a dark region of theinput image, and increase contrast of the dark region of the inputimage; and a local contrast increasing unit configured to increasecontrast of a local region in the dark region the contrast of which isincreased.

The bright region conservation unit may be configured to maintainbrightness of a bright region having greater brightness than amedium-brightness region of the input image, and increase contrast ofthe medium-brightness region of the input image.

The weights applied to the dark region amplified image and the brightregion conserved image may be different from each other according towhether the estimated illuminance is lower than a critical value.

The weight applied to the dark region amplified image may be greaterthan the weight applied to the bright region conserved image if theestimated luminance is lower than the critical value.

According to an aspect of still another exemplary embodiment, there isprovided a non-transitory computer readable medium storing a computerprogram for executing the method of the above.

According to the present inventive concept, occurrence of a haloartifact may be minimized and contrast of an image may be increased byusing an optimized DRC technique.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other features will become more apparent by describing indetail exemplary embodiments with reference to the attached drawings, inwhich:

FIG. 1 is a block diagram showing a configuration of an image processingapparatus according to an exemplary embodiment;

FIG. 2 is a drawing showing images before and after filtering an imageof FIG. 1, according to an exemplary embodiment;

FIG. 3 is a detail block diagram showing an illuminance estimation unitof FIG. 1, according to an exemplary embodiment;

FIG. 4 is a drawing showing images for explaining the illuminanceestimation unit of FIG. 1, according to an exemplary embodiment;

FIGS. 5A-5D illustrate images for explaining a reduction of a haloartifact of FIG. 3, according to an exemplary embodiment;

FIGS. 6A and 6B illustrate a detail block diagram of a dark regionamplification unit and a drawing for explaining the dark regionamplification unit of FIG. 1, according to an exemplary embodiment;

FIGS. 7A and 7B illustrate a detail block diagram of a brightnessconservation unit and a drawing for explaining the bright regionconservation unit of FIG. 1, according to an exemplary embodiment;

FIG. 8 illustrate a dark region amplified image, a bright regionconserved image and a graph for explaining application of weights to thedark region amplified image and the bright region conserved image,according to an exemplary embodiment; and

FIG. 9 is a flow diagram showing a method of processing an image,according to an exemplary embodiment.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

While exemplary embodiments of the inventive concept are capable ofvarious modifications and alternative forms, the embodiments thereof areshown by way of example in the drawings and will herein be described indetail. It should be understood, however, that there is no intent tolimit the embodiments to the particular forms disclosed, but on thecontrary, the embodiments are to cover all modifications, equivalents,and alternatives falling within the scope of the inventive concept. Indescribing the inventive concept, when practical descriptions withrespect to related known functions and configurations may unnecessarilymake the scope of the inventive concept unclear, the descriptionsthereof will be omitted.

It will be understood that, although the terms ‘first’, ‘second’, etc.may be used herein to describe various elements, these elements shouldnot be limited by these terms. These terms are only used to distinguishone element from another.

The terminologies used herein are for the purpose of describingembodiments only and are not intended to be limiting of the embodiments.As used herein, the singular forms “a,” “an,” and “the,” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises,”“comprising,” “includes,” and/or “including,” when used herein, specifythe presence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The inventive concept may be expressed as functional blockconfigurations and various processing steps. The functional blocks maybe realized by a configuration of various hardware and/or software thatperform specific functions. For example, the inventive concept mayemploy direct circuit configurations such as memory, processing, logic,and look-up tables that can perform various functions by at least onemicroprocessor or other control devices. Similar to the configurationelements of the inventive concept that may be executed by softwareprogramming or software elements, the inventive concept may also berealized by programming or scripting languages, such as C, C++, Java,and assembly, including various algorithms that are realized incombination of data structures, processors, routines, or otherprogramming configurations. The functional aspects may be realized in analgorithm that is performed in at least one processor. Also, theinventive concept may employ a conventional technique for electronicenvironment sett-up, signal processing, and/or data processing. Termssuch as mechanism, element, means, configuration may be used in a broadsense, and are not limited to mechanical and physical configurations.The terms may include meanings of a series of routines of software inconnection with a processor.

Hereafter, the inventive concept will be described more fully withreference to the accompanying drawings, in which the exemplaryembodiments are shown. In describing the embodiments with reference todrawings, like reference numerals are used for elements that aresubstantially identical or correspond to each other, and thedescriptions thereof will not be repeated.

Performance of image obtaining apparatuses such as digital cameras iscontinuously being improved. However, in the case of general chargecoupled devices (CCDs) or complementary metal oxide semiconductor (CMOS)sensors, information of a bright region or a dark region is erased dueto the limit of a dynamic range. Here, the dynamic range refers to abrightness ratio between a brightest region and a darkest region in animage. A dynamic range of a sensor used in an image obtaining apparatusis much smaller than that of an obtained actual image, and thus, all ofthe brightness range of the obtained actual image may not be expressed.A high dynamic range (HDR) image has a dynamic range greater than arange that may be possibly expressed in either a general image obtainingapparatus or in a general display apparatus. Accordingly, the HDR imagemay be able to express brightness information closer to an actual imagethan a general image. Therefore, when an HDR image is obtained, detailsof bright regions and dark regions that are not recognized in a generalimage may be obtained.

A dynamic range of an HDR image is greater than a dynamic range which adisplay apparatus may be able to express in an image. Therefore, inorder to express an HDR image in a display apparatus, a wide dynamicrange should be compressed to a dynamic range of the display apparatus.This process is referred to as tone mapping or a dynamic rangecompression (DRC). A compression result may be obtained by designing aglobal tone mapping curve. A resultant image obtained in this way has,as a whole, a very poor contrast and cannot properly express darkregions and bright regions, and thus, cannot express a wide dynamicrange obtained through an HDR composition. Accordingly, the imageprocessing method according to the inventive concept may be able toexpress information of dark regions and bright regions in one HDR imageby distinguishing between the dark regions and the bright regions of theHDR image and applying an amplifying method in which information of thedark regions are adaptively amplified according to the characteristic ofthe HDR image.

FIG. 1 is a block diagram showing a configuration of an image processingapparatus 10 according to an exemplary embodiment.

Referring to FIG. 1, the image processing apparatus 10 includes afiltering unit 100, an illuminance estimation unit 200, a dark regionamplifying unit 300, a bright region conservation unit 400, and acombination unit 500.

The filtering unit 100 uniformly distributes information of an input HDRimage over an entire region of a histogram. Since the input HDR imagehas a wide dynamic range, most of the information is contained in a darkregion of the histogram. This biased distribution of information in thedark region may not enable effective application of the dynamic rangecompression. Accordingly, the filtering unit 100 performs theabove-described uniform distribution of information of the input HDRimage over the entire region of a histogram.

The filtering unit 100 generates a first over-curve and a secondover-curve that has a different degree of amplification than that of thefirst over-curve. Here, the over-curve indicates a curve that canamplify the input HDR image. The filtering unit 100 generates a thirdcurve by adding up weights of the first over-curve and the secondover-curve according to a ratio between a first maximum value and amaximum second value. The first maximum value is the maximum value amongvalues outputted from the first over-curve after passing the input HDRimage through the first over-curve, and the second maximum value is themaximum value among values outputted from the second over-curve afterpassing the input HDR image through the second over-curve. Here, valuesthat are smaller than the maximum value of the input HDR image by apredetermined ratio (for example, 0.001%) are selected as the first andsecond maximum values. This is because an unwanted value such as a muchhigher or lower value than other information in the input HDR image ornoise may end up being obtained as the maximum value. Therefore, astability of algorithms may be ensured by limiting the first and secondmaximum values to be smaller by a predetermined ratio than the maximumvalue of the input HDR image. Afterwards, when the input HDR imagepasses through the third curve, the overall brightness of the input HDRimage is increased. Here, the value of the input HDR image may indicatea pixel value such as intensity of brightness and/or a color value of apixel of the image. In the current embodiment, two over-curves are usedin the filtering unit 100. However, the inventive concept does not limitthe number of over-curves to two, and thus, a different number ofover-curve may be used to implement the filtering unit 100, according toan exemplary embodiment.

FIG. 2A shows an image to which a filtering is not applied to the inputHDR image, and FIG. 2B shows an image to which a filtering is applied tothe input HDR image. Referring to FIG. 2A, the image to which afiltering is not applied is very dark, and, in the histogram below theimage, it is seen that most of the brightness information is containedin a dark region. Referring to FIG. 2B, however, the image to which afiltering is applied is brighter than the image of FIG. 2A, and in thehistogram below the image in FIG. 2B, it is seen that brightnessinformation is uniformly distributed over the entire region of thehistogram. In this way, when the brightness information is uniformlydistributed over the entire region of the histogram, a dynamic rangecompression may be effectively performed, and as a result, a good resultmay be obtained.

The filtering unit 100 may not be included in the image processingapparatus 10 according to an exemplary embodiment. When the filteringunit 100 is included, a signal input to the illuminance estimation unit200, the dark region amplifying unit 300 and the bright regionconservation unit 400 may be a filtered HDR image. However, if thefiltering unit 100 is not included, a signal input to the illuminanceestimation unit 200, the dark region amplifying unit 300 and the brightregion conservation unit 400 is an input HDR image which is notfiltered. Hereinafter, for convenience of explanation, the case in whichthe filtering unit 100 is not included is described.

The illuminance estimation unit 200 acquires a first blurring image anda second blurring image from the input HDR image and estimates anilluminance value by combining the first and second blurring imagesaccording to the characteristics of the input HDR image. The illuminancevalue is obtained by mainly using a blurring image for naturalness of aresultant image. The quality of the resultant image may vary accordingto the degree of blurring. The higher the degree of blurring, the higherthe global contrast of the resultant image, and the resultant image isaccompanied by a halo artifact. The lower the degree of blurring, thepoorer the global contrast of the resultant image. Accordingly, it isrequired to combine the first and second blurring images appropriatelyto form some images.

FIG. 3 is a detail block diagram showing the illuminance estimation unit200 of FIG. 1, according to an exemplary embodiment. Referring to FIG.3, the illuminance estimation unit 200 includes a first blurring unit210, a second blurring unit 220, an illuminance calculation unit 230,and a halo artifact reducing unit 240. The illuminance estimation unit200 will be described with reference to FIGS. 3 through 5.

The first blurring unit 210 interpolates an input HDR image afterdown-sampling the input HDR image, and generates a first blurred imagehaving a blurring degree greater than that of the second blurred imagegenerated by the second blurring unit 220. It is appropriate to blur thefirst blurred image by using a mask having a size of 129×129 blocks.However, due to heavy load of hardware, in the current embodiment, inconsideration of a hardware design, an interpolation method is usedafter down-sampling the input HDR image instead of using a largeblurring mask. Referring to FIG. 4, the first blurred image (a) depictedin FIG. 4 is a result of interpolating to the same size of the input HDRimage after the input HDR image is down-sampled to a size of 12×9inches.

The second blurring unit 220 scans the input HDR image by dividing theinput HDR image into N×N blocks (for example, 3×3 blocks) in a unit of apixel, and generates a second blurred image formed of maximum valuepixels each of which has the maximum pixel value among pixels in a N×Nblock in the input HDR image. Here, the second blurred image has adegree of blurring smaller than that of the first blurred image. FIG. 4shows the second blurred image (b) formed of maximum value pixelsextracted while scanning a filtered HDR image in a 3×3 block.

The illuminance calculation unit 230 calculates illuminance of an imagegenerated by combining the first and second blurred images, the firstand second blurred images having different weights respectively appliedto them according to characteristics (for example, average or varianceof pixel values) of the input HDR image. In FIG. 4, an image (c) is theimage in which a calculated illuminance has been applied to the inputHDR image according to the combination of the first and second blurredimages to which different weights have been applied. In the currentembodiment, two blurring units are used in the illuminance estimationunit 200 to generate two blurred images. However, the inventive conceptdoes not limit the number of blurring units and blurred images to two,and thus, a different number of blurring units and blurred images may beused to implement the illuminance estimation unit 200, according to anexemplary embodiment. Also, the inventive concept is not limited to anembodiment in which the number of blurring units is the same as thenumber of blurred images generated by the blurring units, and thus, thenumber of blurred images and the number of blurring units to generatethe blurred images may be different from each other.

In a case of an image having large brightness differences in regions ofthe image, a halo artifact is generated even though illuminancecalculated in the above-described manner is applied to the input HDRimage. This is because, when there are large brightness differencesbetween some regions in the input HDR image, the degree of variation ofthe illuminance is large. FIG. 5A shows an example image in which a haloartifact is generated after processing the input HDR image by using themethod described above. The halo artifact reducing unit 240 renders anentire brightness of illuminance of the input HDR image to be uniform bypassing the input HDR image, to which the illuminance calculated in theabove-described manner is applied, through a reverse S type curve, andthen, generates estimated illuminance of the input HDR image from theinput HDR image which has passed through the reverse S type curve. Here,the reverse S type curve denotes a curve that renders brightness of amedium-brightness region, among a dark region, the medium-brightnessregion and a bright region of the input HDR image, to be uniform in theinput HDR image. Since the brightness of the illuminance is uniform, thehalo artifact of the resultant image may be reduced. FIG. 5C shows animage from which illuminance is estimated at the illuminance estimationunit 200, that is, the reverse S type curve is applied to the input HDRimage by the halo artifact reducing unit 240. In the case of the imageof FIG. 5A, a left side of the image is very bright due to light outsidethe window, but a right side of the image is very dark due to littlelight enters. In FIG. 5B, a boundary between the dark region and thebright region is smoothly displayed, but the severe difference inbrightness may result in a halo artifact. However, in the case of theimage of FIG. 5C, it is seen that the brightness of illuminance of theimage is made uniform when the reverse S type curve is applied to theinput HDR image which is processed at the illuminance calculation unit230. FIG. 5D shows a final output image when the input HDR image passesthrough the combination unit 500 as shown in FIG. 1. Referring to FIG.5D, it is confirmed that the halo artifact has disappeared, and also,the contrast of the image has not been damaged.

In the above-described manner, the illuminance estimation unit 200estimates illuminance through image blurring, and thus, the amount ofcalculation may be reduced when compared to a related art method ofestimating illuminance by using a Gaussian filter, and also, theoccurrence of a halo artifact may be minimized.

Referring to FIG. 1, the dark region amplifying unit 300 generates adark region amplification image from the input HDR image. FIGS. 6A and6B illustrate a detailed block diagram of the dark region amplifyingunit 300 and a drawing for explaining the dark region amplificationunit, according to an exemplary embodiment.

Referring to FIG. 6A, the dark region amplifying unit 300 includes aglobal contrast increasing unit 310 and a local contrast increasing unit320. The global contrast increasing unit 310 outputs an image in whichcontrast is increased in a brightness amplification process of a darkregion of the input HDR image. At this point, the local contrastincreasing unit 320 increases contrast of a local region in the darkregion.

The global contrast increasing unit 310 and the local contrastincreasing unit 320 are described in detail with reference to FIG. 6B.When the input HDR image is referred to as I, the global contrastincreasing unit 310 generates a blurred image I_(d) formed of maximumvalue pixels, each of which has the maximum pixel value among pixels ina N×N block in the input HDR image, while scanning the input HDR imageby dividing the input HDR image into the N×N blocks (for example, 3×3blocks) in a unit of a pixel. Afterwards, the global contrast increasingunit 310 generates a value A_(d) that indicates a ratio between an inputand an output, wherein the input is a sum of the blurred image I_(d) anda weight of illuminance estimated at the illuminance estimation unit200, and the output is obtained by passing the input through anamplification function f(input). In the function f(input) equation, MAXindicates the brightest value of an image (for example, 255 in an 8-bitimage) and δ is a coefficient that determines a slope of the functionf(input) curve. Also, in the equation for generating the value A_(d), sindicates the weight of illuminance, and, the larger the value s, thehigher the contrast. Afterwards, the global contrast increasing unit 310generates the value A_(db) by applying a Gaussian blurring to the valueA_(d). Here, the applying of the Gaussian blurring is performed by usinga mask having a predetermined size (for example, 1×3 blocks). The globalcontrast increasing unit 310 outputs a global contrast increasing resultO1 by multiplying the input HDR image I with the A_(db) value. When darkregion amplification with respect to the input HDR image is performed,problems such as contrast reduction can occur in some regions in theinput HDR image I. Accordingly, the global contrast increasing unit 310simultaneously performs brightness amplification and contrast increaseof the dark region by using the blurred image I_(d) and the illuminanceto which a weigh is applied.

In order to additionally increase contrast of local regions of theresult O1 outputted from the global contrast increasing unit 310, thelocal contrast increasing unit 320 uses a blurred image, to which theinput HDR image I and characteristics of ambient pixels are reflected,are used. That is, instead of an input HDR image I used to output theresult O1 from the global contrast increasing unit 310, a value based ona ratio between the blurred image Id and the input HDR image I is used,and, as a result, a result O2 in which both the dark region contrast andthe local contrast are increased is output. Here, γ is a coefficient forcontrolling a ratio between the blurred image Id and the input HDR imageI.

Referring to FIG. 1 again, the bright region conservation unit 400generates a bright region conservation image from the input HDR image I.In order to display the input HDR image I as a single screen image, abright region should not be amplified when the dark region is amplified.However, the contrast of a resultant image may not be acceptable if thebright region is only maintained and not amplified. Accordingly, thebright region conservation unit 400 includes a middle-curve design andapplication unit 410 to generate a bright region conservation image bypassing the input HDR image through a middle-curve corresponding to themiddle-curve design.

FIGS. 7A and 7B illustrate a detail block diagram of the brightnessconservation unit 400 and a drawing for explaining the bright regionconservation unit 400. Referring to FIG. 7A, the middle-curve design andapplication unit 410 generates a middle-curve and outputs a result ofapplying the middle-curve to an input HDR image as a bright regionconservation image. Herein, the middle-curve denotes a curve along whichcontrast of the medium-brightness region in the input HDR image, whichpasses through the curve, increases while the bright region maintainsits current brightness. When the input HDR image passes through themiddle-curve, an overall contrast of the image is increased.

The middle-curve design and application unit 410 will be described indetail with reference to FIG. 7B. When the input HDR image is referredto as I, the middle-curve design and application unit 410 generates ablurred image I_(d) formed of maximum value pixels, each of which hasthe maximum pixel value among pixels in a N×N block in the input HDRimage, while scanning the input HDR image by dividing the input HDRimage into N×N blocks (for example, 3×3 blocks) in a unit of a pixel.Afterwards, the middle-curve design and application unit 410 generates avalue A′_(d) that indicates a ratio between an input and an output,wherein the input is a sum of a blurred image I_(d) and a weight ofilluminance estimated at the illuminance estimation unit 200, and theoutput is obtained by passing the input through an amplificationfunction g(input). In the equation of the middle-curve amplificationfunction g(input), MAX indicates the brightest value of the image (forexample, 255 in an 8-bit image 2⁸=256; 0 to 255) and a is a coefficientfor determining a slope of the middle-curve. Also, in the equation forgenerating the value A′_(d), m indicates a weight of illuminance, and,the larger the m value, the higher the contrast. Afterwards, themiddle-curve design and application unit 410 generates A′_(db) byapplying a Gaussian blurring to A′_(d). Here, the Gaussian blurring maybe performed by using a mask having a predetermined size (for example,1×3 blocks when the Gaussian blurring is applied to A′_(d). Themiddle-curve design and application unit 410 outputs a bright regionconservation result O₃ by multiplying the input HDR image I with theA′_(db) value.

Referring to FIG. 1 again, the combination unit 500 combines a darkamplification image and a bright region conservation image afterapplying weights to the two images, respectively, according to theilluminance estimated at the illuminance estimation unit 200. Thecombination unit 500 will be described in detail with reference to FIG.8.

FIG. 8 shows a dark region amplified image (a) outputted from the darkregion amplifying unit 300 and a bright region conserved image (b)outputted from the bright region conservation unit 400. FIG. 8 alsoshows a graph (c) for explaining application of weights to the darkregion amplified image and the bright region conserved image accordingto estimated illuminance. For example, if an estimated illuminance is60,000 lux, the weight for the dark region amplified image is setidentical to that of the bright region conserved image, that is,approximately 0.5. The combination unit 500 amplifies the dark regionamplified image and the bright region conserved image by the same weight0.5. In the graph (c) of FIG. 8, based on a first critical value (forexample, 60,000 lux) of illuminance, regions having illuminance greaterthan the first critical value indicate bright regions, and regionshaving illuminance lower than the first critical value indicate darkregions.

The combination unit 500 determines that an image having illuminance oflower than the first critical value is dark. Therefore, by applying tothe dark region amplified image a weight that is higher than a weightapplied to the bright region conserved image, the dark region amplifiedimage and the bright region conserved image are combined. For example,referring to the graph (c) of FIG. 8, when the estimated illuminance is40,000 lux, the combination unit 500 sets a weigh 0.9 to the dark regionamplified image and a weigh 0.1 to the bright region conserved image.Afterwards, the dark region amplified image to which the weight 0.9 isapplied and the bright region conserved image to which the weight 0.1 isapplied are combined.

The combination unit 500 determines that an image having illuminancegreater than the first critical value is bright. Therefore, afterapplying to the bright region conserved image a weight that is greaterthan a weight applied to the dark region amplified image, the darkregion amplified image and the bright region conserved image arecombined. For example, referring to the graph (c) of FIG. 8, when anestimated illuminance is 80,000 lux, the combination unit 500 applies aweight 0.81 to the dark region amplified image and a weight 0.19 to thebright region conserved image. Afterwards, the dark region amplifiedimage to which the weight 0.19 is applied and the bright regionconserved image to which the weigh 0.81 is applied are combined.

In the current embodiment, the combination unit 500 combines a darkregion amplified image and a bright region conserved image by applyingdifferent weights to the dark region amplified image and the brightregion conserved image, respectively. Accordingly, a dynamic range maybe optimized when compared to a conventional tone mapping method. Thecombination unit 500 may also include another contrast increasing unitwhich increases contrast of a final image generated by combining theweighted dark region amplified image and the weighted bright regionconserved image. Specifically, the contrast of the final image may beincreased through brightness amplification of a dark region of the finalimage by the other contrast increasing unit.

In the current embodiment, an image inputted to the image processingapparatus 10 is an HDR image. However, the inventive concept is notlimited thereto, that is, a general image (for example, a low dynamicrange (LDR) image), and furthermore, a Bayer pattern image may be inputto the image processing apparatus 10.

FIG. 9 is a flow diagram showing a method of processing an image,according to an exemplary embodiment. In the following descriptions,parts that have been described with reference to FIGS. 1 through 8 arenot repeated.

Referring to FIG. 9, the image processing apparatus 10 obtains a firstblurred image and a second blurred image from an input HDR image, andthen, estimates illuminance by combining the first blurred image and thesecond blurred image according to the characteristics of the input HDRimage (S10). The image processing apparatus 10 interpolates an input HDRimage after down-sampling the input HDR image, and afterwards, generatesthe first blurred image having a blurring degree greater than that ofthe second blurred image. Also, the image processing apparatus 10generates a second blurred image formed of maximum value pixels whilescanning the input HDR image by dividing the input HDR image into N×Nblocks (for example, 3×3 blocks) in a unit of a pixel. The secondblurred image has a blurring degree lower than that of the first blurredimage. The image processing apparatus 10, after generating the first andsecond blurred images, calculates illuminance from an image generated bycombining the first blurred image and the second blurred image afterapplying weights to the two images, respectively, according to thecharacteristics (for example, average or variance of pixel values) ofthe input HDR image. In the case of an image having large brightnessdifferences, a halo artifact may still be generated even though theilluminance is calculated by combining the weighted first blurred imageand the weighted second blurred image. Accordingly, the image processingapparatus 10 may reduce a halo artifact by uniformly distributingbrightness throughout the input HDR image by applying a reverse S typecurve, and then, estimates illuminance from the input HDR image to whichthe reverse S type curve is applied.

The image processing apparatus 10 according to the current embodimentmay perform filtering for uniformly distributing information of an inputHDR image over an entire region of a histogram before estimatingilluminance. The filtering may be omitted.

When the estimation of the illuminance is completed, the imageprocessing apparatus 10 generates a dark region amplified image from theinput HDR image (S20). In the process of amplifying the dark region ofthe input HDR image, the image processing apparatus 10 generates thedark region amplified image by performing a global contrast increasingprocess for increasing contrast of a dark region of the image and alocal contrast increasing process that increases contrast with respectto a local region in the dark region, the contrast of which isincreased.

Also, when the illuminance estimation is completed, the image processingapparatus 10 generates a bright region conserved image from the inputHDR image (S30). In order to display an HDR image as a single screenimage, the bright region should not be amplified when the dark region isamplified. However, if the bright region is only maintained and notamplified, the contrast of a resultant image may not be good.Accordingly, the image processing apparatus 10 generates a middle-curve,and generates a bright region conserved image by passing the input HDRimage through the middle-curve. Here, the middle-curve denotes a curvealong which contrast of a medium-brightness region is increased until itis distinguishable by the human eye while maintaining the brightness ofa bright region (for example, a region having brightness higher than themedium-brightness region that can be distinguishable by the human eye inthe input HDR image. When the input HDR image passes through themiddle-curve, a bright region conserved image in which contrast of theentire input HDR image is increased is generated. In FIG. 9, operationS30 is performed after operation S20. However, these two operations maybe performed in a reverse order or at the same time, according to anexemplary embodiment.

When the illuminance estimation and the obtainment of a dark regionamplified image and the bright region conserved image have beencompleted, the image processing apparatus 10 combines the dark regionamplified image and the bright region conserved image by applyingweights to the two images, respectively, according to the estimatedilluminance (S40). The image processing apparatus 10 determines that animage is dark when the image has an illuminance of below the firstcritical value (for example, 60,000 lux), and, after applying to thedark region amplified image a weight that is greater than of a weightapplied to the bright region conserved image, combines the dark regionamplified image and the bright region conserved image. Also, the imageprocessing apparatus 10 determines that an image is bright when theimage has an illuminance that is higher than the first critical value,and, after applying a weight to the bright region conserved image thatis greater than a weight that is applied to the dark region amplifiedimage, combines the dark region amplified image and the bright regionconserved image.

The above embodiments can also be embodied as computer readable codes ona computer readable recording medium. The computer readable recordingmedium is any data storage device that can store data which can bethereafter read by a computer system.

Examples of the computer readable recording medium include read-onlymemory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes,floppy disks, optical data storage devices, and carrier waves (such asdata transmission through the Internet). The computer readable recordingmedium can also be distributed over network coupled computer systems sothat the computer readable code is stored and executed in a distributedfashion. (Also, functional programs, codes, and code segments foraccomplishing the exemplary embodiments can be easily construed byprogrammers skilled in the art to which the inventive concept pertains.)

While this inventive concept has been particularly shown and describedwith reference to the above embodiments, it will be understood by thoseof ordinary skill in the art that various changes in form and detailsmay be made therein without departing from the spirit and scope of theinventive concept as defined by the appended claims. The embodimentsshould be considered in a descriptive sense only and not for purposes oflimitation. Therefore, the scope of the inventive concept is defined notby the detailed description of the inventive concept but by the appendedclaims, and all differences within the scope will be construed as beingincluded in the inventive concept.

What is claimed is:
 1. A method of processing an input image, the methodcomprising: obtaining a first blurred image and a second blurred imagehaving different blurring degrees, from the input image; estimatingilluminance of an image generated by combining the first blurred imageand the second blurred image; generating a dark region amplified imagefrom the input image by amplifying pixel values of a dark region in theinput image; generating a bright region conserved image from the inputimage by maintaining pixel values of a bright region in the input image;applying weights to the dark region amplified image and the brightregion conserved image, respectively, according to the estimatedilluminance; combining the weighted dark region amplified image and theweighted bright region conserved image to generate a final image inwhich occurrence of a halo artifact effect is reduced; and outputtingthe final image for display.
 2. The method of claim 1, wherein the inputimage is an image which is filtered to uniformly distribute informationof the input image over an entire region of a histogram of the inputimage.
 3. The method of claim 2, wherein the filtering comprises:generating a first curve and a second curve having differentamplification degrees; applying different weights to the first curve andthe second curve, respectively, according to a ratio between a firstmaximum value and a second maximum value, wherein the first maximumvalue and the second maximum value are obtained by passing the inputimage through the first curve and the second curve, respectively;generating a third curve by summing the weighted first curve and theweighted second curve; and passing the input image through the generatedthird curve.
 4. The method of claim 1, wherein the estimating theilluminance comprises: down-sampling the input image; generating thefirst blurred image by interpolating the down-sampled input image;generating the second blurred image formed of maximum value pixelsrespectively included in predetermined-size blocks of the input image;applying different weights to the first blurred image and the secondblurred image, respectively, according to characteristics of pixelvalues of the input image; combining the weighted first blurred imageand the weighted second blurred image; and calculating the estimatedilluminance from the combined image.
 5. The method of claim 4, furthercomprising processing an entire brightness of the combined image to beuniform and generate the estimated illuminance therefrom.
 6. The methodof claim 1, wherein the generating the dark region amplified imagecomprises: amplifying brightness of a dark region of the input image,and increasing contrast of the dark region of the input image; andincreasing contrast of a local region in the dark region the contrast ofwhich is increased.
 7. The method of claim 1, wherein the generating thebright region conserved image comprises: maintaining brightness of thebright region having greater brightness than a medium-brightness regionof the input image; and increasing contrast of the medium-brightnessregion of the input image.
 8. The method of claim 1, wherein the weightsapplied to the dark region amplified image and the bright regionconserved image are different from each other according to whether theestimated illuminance is lower than a critical value.
 9. The method ofclaim 8, wherein the weight applied to the dark region amplified imageis greater than the weight applied to the bright region conserved imageif the estimated luminance is lower than the critical value.
 10. Themethod of claim 1, further comprising increasing contrast of the finalimage by performing brightness amplification of a dark region of thefinal image.
 11. An image processing apparatus comprising: a memorycomprising computer executable instructions; a processor configured toexecute the computer executable instructions to implement: anilluminance estimation unit configured to obtain a first blurred imageand a second blurred image having different blurring degrees from aninput image, and estimate illuminance of an image generated by combiningthe first blurred image and the second blurred image according tocharacteristics of the input image; a dark region amplifying unitconfigured to generate a dark region amplified image from the inputimage by amplifying pixel values of a dark region in the input image; abright region conservation unit configured to generate a bright regionconserved image from the input image by maintaining pixel values of abright region in the input image; and a combination unit configured toapply weights to the dark region amplified image and the bright regionconserved image, respectively, according to the estimated illuminance,and combine the weighted dark region amplified image and the weightedbright region conserved image to generate a final image for display inwhich occurrence of a halo artifact effect is reduced to output fordisplay.
 12. The image processing apparatus of claim 11, wherein theprocessor is further configured to execute the computer executableinstructions to implement a filtering unit configured to generate theinput image by uniformly distributing information of the input imageover an entire region of a histogram of the input image.
 13. The imageprocessing apparatus of claim 11, wherein the illuminance estimationunit comprises: a first blurring unit configured to down-sample theinput image and generate the first blurred image by interpolating thedown-sampled input image; a second blurring unit configured to generatethe second blurred image formed maximum value pixels respectivelyincluded in predetermined-size blocks of the input image; and anilluminance computation unit configured to apply different weights tothe first blurred image and the second blurred image, respectively,according to characteristics of pixel values of the input image, combinethe weighted first blurred image and the weighted second blurred image,and calculate the estimated illuminance from the combined image.
 14. Theimage processing apparatus of claim 13, wherein the processor is furtherconfigured to execute the computer executable instructions to implementa halo artifact reducing unit configured to process an entire brightnessof the combined image to be uniform and generate the estimatedilluminance therefrom.
 15. The image processing apparatus of claim 11,wherein the dark region amplifying unit comprises: a global contrastincreasing unit configured to amplify brightness of a dark region of theinput image, and increase contrast of the dark region of the inputimage; and a local contrast increasing unit configured to increasecontrast of a local region in the dark region the contrast of which isincreased.
 16. The image processing apparatus of claim 11, wherein thebright region conservation unit is configured to maintain brightness ofthe bright region having greater brightness than a medium-brightnessregion of the input image, and increase contrast of themedium-brightness region of the input image.
 17. The image processingapparatus of claim 11, wherein the weights applied to the dark regionamplified image and the bright region conserved image are different fromeach other according to whether the estimated illuminance is lower thana critical value.
 18. The image processing apparatus of claim 17,wherein the weight applied to the dark region amplified image is greaterthan the weight applied to the bright region conserved image if theestimated luminance is lower than the critical value.
 19. The imageprocessing apparatus of claim 11, wherein the combination unit isfurther configured to increase contrast of the final image by performingbrightness amplification of a dark region of the final image.
 20. Anon-transitory computer readable medium storing a computer program forexecuting the method of claim 1.